﻿using Minotaur.App.Domains.ViewModel.Menu;
using Minotaur.App.Modules.SystemSet.ViewModels;
using System.Windows.Controls;

namespace Minotaur.App.Modules.SystemSet.Views
{
    /// <summary>
    /// Interaction logic for Menu
    /// </summary>
    public partial class Menu : UserControl
    {
        public Menu()
        {
            InitializeComponent();
        }

        private void Uc_Menu_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
            MenuViewModel viewModel = this.DataContext as MenuViewModel;
            viewModel.MenuTreeGrid = this.MenuTreeGrid;
            viewModel.Dispatcher = this.Dispatcher;
            viewModel.FormDependencyObject = this.menuFormDockPanel;
            viewModel.SubmitFormButton = this.SubmitFormButton;
            viewModel.OpendLoading = true;
            viewModel.InitData();
        }
    }
}
